package c.e.a.b.e.c;

/* compiled from: com.google.android.gms:play-services-measurement-impl@@18.0.0 */
public final class j2 {
    public static volatile x2<Boolean> a = w2.a;
    public static final Object b = new Object();

    /* JADX WARNING: Removed duplicated region for block: B:36:0x009a  */
    /* JADX WARNING: Removed duplicated region for block: B:26:0x0085  */
    public static boolean a(android.content.Context r4, android.net.Uri r5) {
        /*
        r5 = r5.getAuthority();
        r0 = "com.google.android.gms.phenotype";
        r0 = r0.equals(r5);
        r1 = 0;
        if (r0 != 0) goto L_0x002e;
    L_0x000d:
        r4 = "PhenotypeClientHelper";
        r0 = java.lang.String.valueOf(r5);
        r0 = r0.length();
        r0 = r0 + 91;
        r2 = new java.lang.StringBuilder;
        r2.<init>(r0);
        r2.append(r5);
        r5 = " is an unsupported authority. Only com.google.android.gms.phenotype authority is supported.";
        r2.append(r5);
        r5 = r2.toString();
        android.util.Log.e(r4, r5);
        return r1;
    L_0x002e:
        r5 = a;
        r5 = r5.b();
        if (r5 == 0) goto L_0x0043;
    L_0x0036:
        r4 = a;
        r4 = r4.c();
        r4 = (java.lang.Boolean) r4;
        r4 = r4.booleanValue();
        return r4;
    L_0x0043:
        r5 = b;
        monitor-enter(r5);
        r0 = a;	 Catch:{ all -> 0x00b3 }
        r0 = r0.b();	 Catch:{ all -> 0x00b3 }
        if (r0 == 0) goto L_0x005c;
    L_0x004e:
        r4 = a;	 Catch:{ all -> 0x00b3 }
        r4 = r4.c();	 Catch:{ all -> 0x00b3 }
        r4 = (java.lang.Boolean) r4;	 Catch:{ all -> 0x00b3 }
        r4 = r4.booleanValue();	 Catch:{ all -> 0x00b3 }
        monitor-exit(r5);	 Catch:{ all -> 0x00b3 }
        return r4;
    L_0x005c:
        r0 = "com.google.android.gms";
        r2 = r4.getPackageName();	 Catch:{ all -> 0x00b3 }
        r0 = r0.equals(r2);	 Catch:{ all -> 0x00b3 }
        r2 = 1;
        if (r0 == 0) goto L_0x006b;
    L_0x0069:
        r0 = 1;
        goto L_0x0083;
    L_0x006b:
        r0 = r4.getPackageManager();	 Catch:{ all -> 0x00b3 }
        r3 = "com.google.android.gms.phenotype";
        r0 = r0.resolveContentProvider(r3, r1);	 Catch:{ all -> 0x00b3 }
        if (r0 == 0) goto L_0x0082;
    L_0x0077:
        r3 = "com.google.android.gms";
        r0 = r0.packageName;	 Catch:{ all -> 0x00b3 }
        r0 = r3.equals(r0);	 Catch:{ all -> 0x00b3 }
        if (r0 == 0) goto L_0x0082;
    L_0x0081:
        goto L_0x0069;
    L_0x0082:
        r0 = 0;
    L_0x0083:
        if (r0 == 0) goto L_0x009b;
    L_0x0085:
        r4 = r4.getPackageManager();	 Catch:{ all -> 0x00b3 }
        r0 = "com.google.android.gms";
        r4 = r4.getApplicationInfo(r0, r1);	 Catch:{ NameNotFoundException -> 0x0097 }
        r4 = r4.flags;	 Catch:{ all -> 0x00b3 }
        r4 = r4 & 129;
        if (r4 == 0) goto L_0x0097;
    L_0x0095:
        r4 = 1;
        goto L_0x0098;
    L_0x0097:
        r4 = 0;
    L_0x0098:
        if (r4 == 0) goto L_0x009b;
    L_0x009a:
        r1 = 1;
    L_0x009b:
        r4 = java.lang.Boolean.valueOf(r1);	 Catch:{ all -> 0x00b3 }
        r4 = c.e.a.b.e.c.x2.a(r4);	 Catch:{ all -> 0x00b3 }
        a = r4;	 Catch:{ all -> 0x00b3 }
        monitor-exit(r5);	 Catch:{ all -> 0x00b3 }
        r4 = a;
        r4 = r4.c();
        r4 = (java.lang.Boolean) r4;
        r4 = r4.booleanValue();
        return r4;
    L_0x00b3:
        r4 = move-exception;
        monitor-exit(r5);	 Catch:{ all -> 0x00b3 }
        throw r4;
        */
        throw new UnsupportedOperationException("Method not decompiled: c.e.a.b.e.c.j2.a(android.content.Context, android.net.Uri):boolean");
    }
}
